﻿#pragma once
#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:6031)

#include<stdio.h>
#include<locale.h>//设置环境
#include<math.h>
#include<stdlib.h>
#include<string.h>

enum GameStatus
{
	None ,
	White ,
	Black
};

#define Playerchess L'●'
#define Computerchess L'□'
#define ROL 15
#define COL 15


void GameStart(int chessBoard[ROL][COL]);
void PrintBoard(int chessBoard[ROL][COL]);
void Print(int type, char* wall);
void UpDate(int chessBoard[ROL][COL]);

//更新游戏界面

//初始化
void InitGame();


//菜单界面
void menu();
void menu1();


//电脑回合
void ComputerTurn(int chessBoard[ROL][COL]);
//玩家回合
void PlayerTurn(int chessBoard[ROL][COL], int flg);



void SetChess(int chessBoard[ROL][COL], int flg);


//检查类
int CheckPos(int x, int y);
int CheckChess(int chessBoard[ROL][COL], int x, int y);
int CheckWin(int chessBoard[ROL][COL]);
int ComputerWin(int chessBoard[ROL][COL], int x, int y, int flg);
int PlayerWin(int chessBoard[ROL][COL], int x, int y, int flg);
int* Count(int chessBoard[ROL][COL], int x, int y, int flg);
void Freshen(int chessBoard[ROL][COL]);
void UpdateWeight(int chessBoard[ROL][COL]);